/*
*	Copyright (C) 2014  Julio Montes, Mario Carrillo
*
*	Julio Montes e-mail: imc.coder@gmail.com
*
*	Mario Carrillo e-mail: mario_90ago@live.com.mx
*
*	BSD 3-Clause License
*/

#ifndef ALLIANCE_TOOL_H
#define ALLIANCE_TOOL_H

#include "sdk/include/filecfg.h"

namespace alliance
{
    class Tool
    {
    public:
        /*static const wxString s_typeInput;
        static const wxString s_typeOutput;
        static const wxString s_typePattern;*///TODO: remove

        Tool( const wxString &command, const wxString &commandFormat );
        virtual ~Tool();

        const wxString &GetName() const;

        void Save( sdk::FileConfig *fileConfig );

        bool Load( const sdk::multimapElements &elements );

        wxString GetCommandForFile() const;

        //wxString GetFileByType( const wxString &type ) const; //TODO: remove

        void AddVariable( const wxString &name, const wxString &value );
        void AddOption( const wxString &value, const wxString &additional=wxEmptyString );
        void AddOther( const wxString &name, const wxString &value, const wxString &type );

        /*const sdk::multimapElements &GetVariables() const;
        const sdk::multimapElements &GetOptions() const;
        const sdk::multimapElements &GetOthers() const;*/
    protected:
    private:
        sdk::multimapSimpleElements m_variables;
        sdk::multimapSimpleElements m_options;
        sdk::multimapSimpleElements m_others;
        wxString m_command;
        wxString m_commandFormat;

        void AddOption( const sdk::mapAttributes &attributes );
        void AddVariable( const sdk::mapAttributes &attributes );
        void AddOther( const wxString &name, const sdk::mapAttributes &attributes );
    };
}

#endif //ALLIANCE_TOOL_H
